//该文件用于创建Vuex中最为核心的store
// 引入vue
import Vue from 'vue'
//引入Vuex
import Vuex from 'vuex'
//应用Vuex插件
Vue.use(Vuex)


const mutations = {
  changeCity(state,value){
    state.city = value;
    localStorage.value = value;
  }
}

const state = {
  city: localStorage.value || '武汉'
}

export default new Vuex.Store({
  mutations,
  state
})